package y2015.day_13.限制泛型;

public class LuoFei<T extends ShuiLu> {//限制类型 T 只能是Animal的子类
    private T fish;

    public void setFish(T fish) {
        this.fish = fish;
    }//设置鱼类

    public T getFish() {
        return this.fish;
    }

    public void outFish() {
        System.out.println("罗非鱼:");
    }


}

